FROM golang:1.16 as go-builder

ENV GOPROXY=https://goproxy.cn

RUN go build -o ${GOBIN}/run main.go

FROM ubuntu

VOLUME /web

COPY --from=go-builder ${GOBIN}/run /web/run

COPY ./static /web/static

ENTRYPOINT 9090 9443

CMD ["/web/run"]